package gui.markers;

/*
 * Class that produces appropriate FigureMarkers
 */

public class FigureMarkerFactory {
    
    public static final int SELECT        = 0;
    public static final int LINE          = 1;
    public static final int STRAIGHT_LINE = 2;
    public static final int RECTANGLE     = 3;
    public static final int ELLIPSE       = 4;
    public static final int RESIZE        = 5;
    
    public static FigureMarker createObject( int drawingMode ) {
        FigureMarker result = null;
        
        switch( drawingMode ) {
            case LINE:
                result = new LineMarker();
                break;
            case RECTANGLE:
                result = new RectMarker();
                break;
            case ELLIPSE:
                result = new EllipseMarker();
                break;
            case STRAIGHT_LINE:
                result = new StraightLineMarker();
                break;
                
            default:
                result = null;
                break;
        }
        return result;
    }
    
}
